<?php

use Phinx\Migration\AbstractMigration;

class AddColumnPartyInvoiceStatusPartyInvoiceStatusInOrderTable extends AbstractMigration
{
    public function up()
    {
        $this->table("order")
            ->addColumn("party_a_invoice_status", "enum", [
                'values' => 'no,submit,yes',
                'default' => 'no',
                'comment' => '甲方开票状态',
                'null' => false,
            ])
            ->addColumn("party_b_invoice_status", "enum", [
                'values' => 'no,uploaded,yes',
                'default' => 'no',
                'comment' => '乙方开票状态',
                'null' => false,
            ])->save();
    }

    public function down()
    {
        $this->table("order")
            ->removeColumn("party_a_invoice_status")
            ->removeColumn("party_b_invoice_status")
            ->save();
    }
}
